package com.ruiysoft.controller.integralmdse.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * IntegralMdseSaveVo
 */
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-04-27T07:36:00.934+08:00")

public class IntegralMdseSaveVo {
  @JsonProperty("skuId")
  private Long skuId = null;

  @JsonProperty("type")
  private Integer type = null;

  @JsonProperty("list")
  @Valid
  private List<IntegralMdseVo> list = new ArrayList<IntegralMdseVo>();

  public IntegralMdseSaveVo skuId(Long skuId) {
    this.skuId = skuId;
    return this;
  }

  /**
   * skuId
   * @return skuId
  **/
  @ApiModelProperty(example = "12", value = "skuId")


  public Long getSkuId() {
    return skuId;
  }

  public void setSkuId(Long skuId) {
    this.skuId = skuId;
  }

  public IntegralMdseSaveVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * 类型（1，纯现金或纯积分，2，固定现金+固定积分，3，积分抵现金)
   * @return type
  **/
  @ApiModelProperty(example = "1", value = "类型（1，纯现金或纯积分，2，固定现金+固定积分，3，积分抵现金)")


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public IntegralMdseSaveVo list(List<IntegralMdseVo> list) {
    this.list = list;
    return this;
  }

  public IntegralMdseSaveVo addListItem(IntegralMdseVo listItem) {
    if (this.list == null) {
      this.list = new ArrayList<IntegralMdseVo>();
    }
    this.list.add(listItem);
    return this;
  }

  /**
   * Get list
   * @return list
  **/
  @ApiModelProperty(value = "")

  @Valid

  public List<IntegralMdseVo> getList() {
    return list;
  }

  public void setList(List<IntegralMdseVo> list) {
    this.list = list;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IntegralMdseSaveVo integralMdseSaveVo = (IntegralMdseSaveVo) o;
    return Objects.equals(this.skuId, integralMdseSaveVo.skuId) &&
        Objects.equals(this.type, integralMdseSaveVo.type) &&
        Objects.equals(this.list, integralMdseSaveVo.list);
  }

  @Override
  public int hashCode() {
    return Objects.hash(skuId, type, list);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IntegralMdseSaveVo {\n");

    sb.append("    skuId: ").append(toIndentedString(skuId)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    list: ").append(toIndentedString(list)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

